bugfix(registry): Prioritize HKEY_CURRENT_USER registry reads and writes over HKEY_LOCAL_MACHINE to prevent inaccessible data#1844
Conversation
…o prevent stale values
|
Imagine the following:
could this be an issue, or is there a key generated for user2 as well? |
Ok changed it so: This is good enough for this issue/change IMHO - Eventually, we should probably have intentional “is this setting global or per-user?” code in the game logic rather than relying on whether the user ran the game as admin or not. |
|
| Filename | Overview |
|---|---|
| Core/Libraries/Source/WWVegas/WWDownload/registry.cpp | Flipped read priority to HKCU-first and removed HKLM writes, now writing only to HKCU for per-user settings |
| Generals/Code/GameEngine/Source/Common/System/registry.cpp | Flipped read priority to prefer HKCU over HKLM (no write functions in this file) |
| GeneralsMD/Code/GameEngine/Source/Common/System/registry.cpp | Flipped read priority to prefer HKCU over HKLM for both Zero Hour and vanilla Generals registry paths |
Last reviewed commit: 5844d2d
…tes over HKEY_LOCAL_MACHINE to prevent inaccessible data (TheSuperHackers#1844)
Per-user settings (e.g. HTTP Proxy) should always go in HKEY_CURRENT_USER.
Flips both read and write priority to prefer HKCU over HKLM across all registry helpers, with HKLM as fallback. This prevents stale HKCU values when the game is run with admin privileges.